﻿#ifndef QQ_LOGIN_H_
#define QQ_LOGIN_H_

#include<QDialog>
#include<QScopedPointer>
#include <QNetworkRequest>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include "D:/MSVCCode/UserPrivilegeManageSystem/out/build/x64-Debug/UserPrivilegeManageSystem-Client/ui_QQ_Login.h"
class QQ_Login : public QDialog
{
	Q_OBJECT
public:
	explicit QQ_Login(QDialog* parent = nullptr);
	void initUi();
	void SaveToConfig();
	void LoadFromConfig();
	static inline QString Token() { return m_Token; };
public Q_SLOTS:
	void on_minBtn_released();
	void on_closeBtn_released();
	void on_loginBtn_released();
	void on_autoLoginCbx_clicked();
protected:
	void resizeEvent(QResizeEvent* ev)override;
private:
	QScopedPointer<Ui::Form> ui;
	QNetworkAccessManager* m_manager;
	static QString m_Token;
	bool loginSucces{false};
};

#endif // !QQ_LOGIN_H_
